//package com.ruoyi.user.model.factory.impl;
//
//import com.mmd.base.auth.TokenTemplate;
//import com.mmd.base.pojo.entity.UserInfo;
//import com.mmd.base.pojo.vo.TokenVO;
//import com.mmd.user.model.enums.LoginStrategy;
//import com.mmd.user.model.pojo.request.LoginRequest;
//import com.mmd.user.services.factory.LoginFactory;
//import org.springframework.stereotype.Component;
//
//@Component
//public class LoginFactoryAlipayImpl implements LoginFactory {
//    @Override
//    public TokenVO<String> login(LoginRequest loginRequest) throws Exception {
//        UserInfo<String> userInfo = UserInfo.<String>builder()
//                .username("1")
//                .build();
//        String authorization = TokenTemplate.saveToken(loginRequest.getLoginEnum(), userInfo);
//        return TokenVO.<String>builder()
//                .authorization(authorization)
//                .loginEnum(loginRequest.getLoginEnum())
//                .other("支付宝登录")
//                .build();
//    }
//
//    @Override
//    public LoginStrategy getStrategy() {
//        return LoginStrategy.ALIPAY;
//    }
//}
